package cn.com.bsfit.netty.task;

import com.google.common.collect.Maps;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Map;

/**
 * 类名 Req2DataTaskRs
 * 描述 请求转换为Map的任务结果实体
 *
 * @author hedonglin
 * @version 1.0
 * @date 2019/12/17 9:40
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
public class Req2MapTaskRs implements Serializable {
    private static final long serialVersionUID = -4185162819061392340L;
    /**
     * 成功的标志
     */
    private boolean success;
    /**
     * 是JSON数据
     */
    private boolean isJson;
    /**
     * 是XML数据
     */
    private boolean isXml;
    /**
     * 是健康检查
     */
    private boolean isHealth;

    /** 当前顶层字段 */
    private String currentTopField;

    /**
     * 转换后的结果数据
     */
    private Map<String, Object> resultData = Maps.newHashMap();

    public Req2MapTaskRs(boolean success, boolean isJson, boolean isXml, boolean isHealth,String currentTopField, Map<String, Object> resultData) {
        this.success = success;
        this.isJson = isJson;
        this.isXml = isXml;
        this.isHealth = isHealth;
        this.currentTopField = currentTopField;
        this.resultData = resultData;
    }

}
